package com.nebula.api.common.entity;

import com.nebula.api.modules.member.entity.CmfMember;
import com.nebula.commons.modules.system.entity.SysUser;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 负责动态注入用户信息的token设计.避免了以前的浪费对象的缺陷
 *
 * @author Eastern unbeaten
 * @email chenshiyun2011@163.com
 * @date 2019-08-16 16:54
 */
@Setter
@Getter
public class TokenUser implements Serializable {


    /**
     * ip地址
     */
    private String ip;

    /**
     * 设备信息
     */
    private String equipment;

    /**
     * 用户信息
     */
    private CmfMember userInfo;

    public TokenUser(CmfMember userInfo) {
        this.userInfo = userInfo;
    }

    public TokenUser() {
    }

    public TokenUser(String ip, String equipment, CmfMember userInfo) {
        this.ip = ip;
        this.equipment = equipment;
        this.userInfo = userInfo;
    }
}
